<!DOCTYPE html>
<?php
    session_start();
?>
<html lang="es" xml:lang="es">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Panel Administrador</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="css/jquery.dataTables.min.css" rel="stylesheet">
    <link href="css/plugins/timeline/timeline.css" rel="stylesheet">
    <link href="css/sb-admin.css" rel="stylesheet">
</head>
        
        <body>
                <div id="mensajito_exito" class="alert alert-success alert-dismissable" style="display: none;">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                Ha salido del sistema con éxito. ¡Vuelva pronto!
            </div>
                <div id="mensajito_error" class="alert alert-danger alert-dismissable" style="display: none;">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                Error en la autenticación. Inténtelo de nuevo.
        </div>
                <div class="row">
                        <div class="col-md-4"></div>
                        <div class="col-md-4">
                                <br/>
                                <br/>
                                <div class = "text-center"><img src = "img/logos.png"></div>
                                <br/>
                                <br/>
                                <div class="col-xs-12">
                                        <h1 class = "text-center">Bienvenido</h1>
                                        <div class = "text-center"><img src = "img/sigec.png"></div>
                                        <h5 class = "text-center"><strong>Sistema de Gesti&oacute;n de la Escuela de Computaci&oacute;n</strong></h5>
                                        <br/><br/><br/>
                                        <h4 class = "text-center">Inicia sesi&oacute;n para empezar</h4>
                                        
                                </div>
                                <div>
                                        <div class="col-xs-1"></div>
                                        <div class="col-xs-10">
                                                <form>
                                                        <br/>
                                                        <div class="col-xs-3"></div>
                                                        <input type ="button" id="letra_boton" class = "col-xs-6 btn btn-primary" value= "Ingresar" data-toggle="modal" data-target="#myModal1">
                                                        <div class="col-xs-3"></div>
                                                </form>
                                        </div>
                                        <div class="col-xs-1"></div>
                                </div>
                        </div>
                        <div class="col-xs-4"></div>
                </div>
                
                <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                  <div class="modal-dialog ">
                        <div class="modal-content">
                                <div class="modal-header" style="background: #CEE3F6;">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                        <h3 class="modal-title" id="myModalLabel"><strong>Iniciar Sesi&oacute;n</strong></h3>
                                </div>
                                <form action="autenticar.php" method="post">
                                        <div class="modal-body" >
                                                <label>Usuario</label>
                                                <input type = "text" class = "form-control" name="user" required>
                                                </br>
                                                <label>Contraseña</label>
                                                <input type = "password" class = "form-control" name="pass" required>
                                        </div>
                                        <div class="modal-footer">
                                                <button type="button" class="btn btn-danger" id="letra_boton" data-dismiss="modal">Cancelar</button>
                                                <button type="submit" id="letra_boton" class="btn btn-primary">Continuar</button>
                                        </div>
                                </form>
                        </div>
                  </div>
                </div>
                
                <div class="clearfix"></div>
                
                <!-- Javascript files -->
                <!-- jQuery -->

    <script src="js/jquery-1.11.0.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/jquery.dataTables.min.js"></script>
    <script src="js/jquery.validate.min.js"></script>
    <script src="js/sb-admin.js"></script>
        <script>
                <?php  if(isset($_SESSION['error'])){?>
                $("#mensajito_error").show();
            <?php  }?>
            <?php  if(isset($_SESSION['logout'])){?>
                $("#mensajito_exito").show();
            <?php  }unset($_SESSION['logout']);?>
            setTimeout(function() {
            $('#mensajito_error').fadeOut('slow');
            $('#mensajito_exito').fadeOut('slow');
        }, 2000);
    </script>
        </body> 
</html>
